<?php
header("HTTP/1.0 404 Not Found");

$sUrl = (isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : '');
if ($sUrl)
{
	if (substr($sUrl, -4) == '.gif' || substr($sUrl, -4) == '.png' || substr($sUrl, -4) == '.jpg' || substr($sUrl, -5) == '.jpeg') 
	{
        $sText = 'Not Found!';
		$nW = 100;
        $nH = 30;
        $nLeft = 5;
        $nTop = 5;
		$hImg = imageCreate($nW, $nH);
	    $nBgColor  = imageColorAllocate($hImg, 0, 0, 0);
        $nTxtColor = imageColorAllocate($hImg, 255, 255, 255);
        imageString($hImg, 5, $nLeft, $nTop,  $sText, $nTxtColor) or die();
        ob_clean();
        header('Content-Type: image/jpeg');
        imagejpeg($hImg);        
		exit;		
	}	
}


?>